<template>
  <div class="covid">
    <div class="covid-title" @click="goModule('covidControl')">
      <span class="iconfont icon-covid">&#xe753;</span>
      <span class="covid-title-text">新冠肺炎防治专栏</span>
    </div>
    <div class="covid-content">
      <el-row :gutter="20">
        <el-col :span="12">
          <div class="grid-content covid-module" @click="goModule('covidControl/epidemicInformation')">
            <img src="@/assets/images/diseaseData.jpg" class="covid-img" />
            <div><span class="covid-module-name">疫情速报</span></div>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="grid-content covid-module" @click="goModule('covidControl/variety')">
            <img src="@/assets/images/virus.jpg" class="covid-img" />
            <div><span class="covid-module-name">病毒变种</span></div>
          </div>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="12">
          <div class="grid-content covid-module" @click="goModule('covidControl/protection')">
            <img src="@/assets/images/personalProtect.jpg" class="covid-img" />
            <div><span class="covid-module-name">个人防护</span></div>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="grid-content covid-module" @click="goModule('covidControl/regionalPolicies')">
            <img src="@/assets/images/policy.jpg" class="covid-img" />
            <div><span class="covid-module-name">各地防控</span></div>
          </div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
export default {
  methods:{
    goModule(route){
      let link = this.$router.resolve({
        path: route,
      });
      window.open(link.href, "_blank");
    }
  }
};
</script>

<style lang="less" scoped>
.el-row {
  margin-bottom: 20px;
  margin-top: 10px;
}
.el-col {
  border-radius: 4px;
}
.grid-content {
  min-height: 36px;
}
.row-bg {
  padding: 10px 0;
  background-color: #f9fafc;
}
.covid {
  margin-top: 10px;
  border-right: 1px dashed #d7d7d7;
  .covid-title {
    padding-bottom: 10px;
    font-size: 18px;
    .icon-covid {
      color: @themeColor;
      font-size: 24px;
      vertical-align: bottom;
    }
    .covid-title-text {
      cursor: pointer;
      &:hover {
        color: @themeColor;
      }
    }
  }
  .covid-content {
    .covid-module {
      cursor: pointer;
      .covid-img {
        width: 160px;
        height: 90px;
      }
      .covid-module-name {
        font-size: 16px;
        &:hover {
          color: @themeColor;
        }
      }
    }
  }
}
</style>